<style type="text/css">
	p.price-remark{
		width:300px;
		color:#767D82;
	}
	ul.switch-bottom{
		margin-bottom:30px;
	}
</style>

<script type="text/javascript">
(function(){
	<%
		local para = {
			signal_set = {config = {}}
		}

		local result = tpl_get_data(para)
		local signalInfo = result[K_MODULE].signal_set.config
	-%>
	var power = '<%=signalInfo.power%>';
	var enable;

	//初始状态为开启一键穿墙（1），但默认按钮状态应为0（健康节能关闭）
	if ("1" == power){
		enable = "0";
	}else{
		enable = "1";
	}

	initSwitch("SignalSwitch", enable, onSwitchClick)

	function onSwitchClick(state, init){
		if(!init){
			var data = {};
			var para = {};
			para.signal_set = {};
			para.signal_set.config = data;

			if("0" == $("#SignalSwitch").attr("data-value")){
				data.power= "1";
			}else{
				data.power= "0";
			}

			showLoading(label.saving);
			apiSet(para, function(ret){
				$.setTimeout(function(){
					closeLoading();
				}, 2000);
			});
		}
	}
})();
</script>
<div class="help hidden">
	<ul class="help-content">
		<li class="help-head">
			<img class="app-icon" src="/luci-static/images/app-icon/signal.png?_=20170809165512" />
			<span class="help-title">{%label.signalSet%}</span>
		</li>
		<li class="summary">{%helpStr.signal%}</li>
	</ul>
</div>
<div class="head-con">
	<img class="app-icon" src="/luci-static/images/app-icon/signal.png?_=20170809165512" />
	<a href="javascript:history.go(-1);" class="head-btn-l">
		<i class="head-btn icon icon_back"></i>
		<span class="head-title">{%label.signalSet%}</span>
	</a>
</div>
<div class="set-con below-head">
	<ul class="set-con set-con-switch switch-bottom">
		<p class="set-con-desc">
			<label class="tip-lbl">{%label.signalSet%}</label>
			<span id="SignalSwitch" class="switch">
				<i class="switch-circle icon_select_off"></i>
			</span>
		</p>
	</ul>
	<div class="err-note">
		<p class="note-str price-remark">{%label.keyWall%}</p>
	</div>
</div>